Skip to content

ci(mergify): upgrade configuration to current format#4796

Open
mergify[bot] wants to merge 1 commit intomasterfrom
mergify/configuration-deprecated-update
Open

ci(mergify): upgrade configuration to current format#4796
mergify[bot] wants to merge 1 commit intomasterfrom
mergify/configuration-deprecated-update

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify bot commented Mar 24, 2026

Warning

The following required products are not enabled for this repository: merge_protections.
If you merge this PR without enabling them first, some of your rules will stop working.
Please enable them in your Mergify dashboard before merging.


Hey there! 👋

We've noticed that your Mergify configuration is using some deprecated fields.

No worries—we've got your back! This automated PR updates your config to align with the newest standards, ensuring everything keeps running smoothly.

Do not procrastinate! You must upgrade your configuration before 2026-09-30, otherwise your configuration will stop working.

What's Changed?

Why This Matters

Keeping your configuration up-to-date means you'll benefit from the latest features and improvements Mergify has to offer. Plus, it helps prevent any unexpected hiccups down the road.

Got Questions? We've Got Answers! 🙌

Is this update safe to merge?

Absolutely! We've made sure the changes are compatible with your current setup. Your workflows should continue to work just as before—if not better!

Do I need to do anything special after merging?

Nope! Just merge this PR, and you're all set. If you have any custom configurations, it's a good idea to give them a quick look to ensure everything's in order.

What if I run into issues or have concerns?

We're here to help! Feel free to reach out to our support team anytime.

Thanks for being awesome and keeping your configuration up-to-date! If you have any thoughts or need a hand, don't hesitate to let us know.

Happy merging! 🎉

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 24, 2026

Greptile Summary

This PR is an automated Mergify migration that upgrades .mergify.yml from the deprecated pull_request_rules + post_check action pattern to the newer merge_protections top-level key. The two existing approval rules (one for Lookout UI changes, one for general Armada maintainer approval) are preserved with identical success_conditions logic; only the structural wrapping and the title display field (which has no equivalent in the new format) are changed.

Key points:

  • Prerequisite before merging: The merge_protections Mergify product must be explicitly enabled in the repository's Mergify dashboard. The PR description itself warns that merging without enabling it will cause both protection rules to stop working, leaving the repository with no approval enforcement.
  • Logic is faithfully preserved: The success_conditions blocks are identical to the old post_check success conditions — the conditions key is renamed to if, and the action wrapper is removed.
  • if gate behaviour: Both rules retain if: "#approved-reviews-by>=1", meaning they are only evaluated once at least one approval exists. This is the same behaviour as before but worth noting — PRs with zero approvals will not have either protection triggered.

Confidence Score: 3/5

  • Safe to merge only after enabling the merge_protections product in the Mergify dashboard; merging first would leave the repository without any active approval enforcement.
  • The migration logic itself is correct and faithfully reproduces the old rules in the new format. The score is reduced because there is a hard external prerequisite (enabling merge_protections in the Mergify dashboard) that must be completed before this PR is merged, otherwise both protection rules will silently stop working. This is explicitly called out in the auto-generated PR description but is easy to overlook.
  • .mergify.yml — the only changed file; verify the merge_protections dashboard feature is enabled before merging.

Important Files Changed

Filename Overview
.mergify.yml Migrates Mergify config from deprecated pull_request_rules + post_check to the new merge_protections format; logic is preserved but the merge_protections product must be enabled in the Mergify dashboard before merging, otherwise all protections will stop working.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[PR Opened / Updated] --> B{if: approved-reviews-by >= 1?}

    B -- No --> C[Protection not applicable\nPR may merge without checks]
    B -- Yes --> D{Rule 1: Lookout UI Changes?}
    B -- Yes --> E{Rule 2: Armada Maintainers?}

    D --> D1{success_conditions}
    D1 --> D2["- files~=^internal/lookoutui/\n(no Lookout UI files)"]
    D1 --> D3["approved-reviews-by >= 2"]
    D1 --> D4["approved-reviews-by >= 1\nAND author is frontend/maintainer"]
    D2 --> PASS1[✅ Protection Passes]
    D3 --> PASS1
    D4 --> PASS1
    D1 -- none met --> FAIL1[❌ Protection Fails / Blocks Merge]

    E --> E1{success_conditions}
    E1 --> E2["files ONLY in lookoutui/\n(exclusive UI-only PR)"]
    E1 --> E3["approved-reviews-by >= 2"]
    E1 --> E4["approved-reviews-by >= 1\nAND author is Armada maintainer"]
    E2 --> PASS2[✅ Protection Passes]
    E3 --> PASS2
    E4 --> PASS2
    E1 -- none met --> FAIL2[❌ Protection Fails / Blocks Merge]
Loading

Reviews (1): Last reviewed commit: "ci(mergify): upgrade configuration to cu..." | Re-trigger Greptile

@@ -1,30 +1,25 @@
pull_request_rules:
merge_protections:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 merge_protections product must be enabled before merging

The PR description itself warns: "The following required products are not enabled for this repository: merge_protections. If you merge this PR without enabling them first, some of your rules will stop working."

Merging this before enabling merge_protections in the Mergify dashboard will leave the repository with no active approval enforcement — both the Lookout UI and Armada maintainer approval protections will silently stop working. The old pull_request_rules + post_check rules are being removed, and the new merge_protections block is inert until the feature is activated.

Recommended order of operations:

  1. Enable the merge_protections product in the Mergify dashboard for this repository.
  2. Merge this PR.
  3. Verify the two protection rules appear as active checks on a subsequent PR.

Comment on lines +4 to 5
if:
- "#approved-reviews-by>=1"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 if condition gates protection on existing approval

Both protection rules use if: "#approved-reviews-by>=1", which means the protection is only evaluated after at least one approval already exists. A PR with zero approvals will have neither protection apply, and could potentially be merged without any checks firing.

This behaviour is preserved from the original pull_request_rules conditions, so it is not a regression introduced by this migration. However, it's worth a conscious decision: if the intent is to always block until the approval criteria are met (regardless of whether any approval exists yet), the if field can be omitted entirely so the protection is always evaluated.

  - name: Require approval from frontend or Armada maintainers for Lookout UI changes
    # no `if:` → always enforced
    success_conditions:
      ...

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants